package service

import (
	sqlc "bgs/db/sqlc"
)

func (s *ProductServiceImp) MapProductGroupEntityToPtr(list []sqlc.ProductGroup) []*sqlc.ProductGroup {
	ptrs := make([]*sqlc.ProductGroup, len(list))
	for i := range list {
		ptrs[i] = &list[i]
	}
	return ptrs
}

func (s *ProductServiceImp) MapListNormalProductWithDistributeInfoRowEntityToPtr(list []sqlc.ListNormalProductWithDistributeInfosByBrandIDRow) []*sqlc.ListNormalProductWithDistributeInfosByBrandIDRow {
	ptrs := make([]*sqlc.ListNormalProductWithDistributeInfosByBrandIDRow, len(list))
	for i := range list {
		ptrs[i] = &list[i]
	}
	return ptrs
}

func (s *ProductServiceImp) MapListNormalProductWithDistributeInfosByBrandIDAndProductIDsRowEntityToPtr(list []sqlc.ListNormalProductWithDistributeInfosByBrandIDAndProductIDsRow) []*sqlc.ListNormalProductWithDistributeInfosByBrandIDAndProductIDsRow {
	ptrs := make([]*sqlc.ListNormalProductWithDistributeInfosByBrandIDAndProductIDsRow, len(list))
	for i := range list {
		ptrs[i] = &list[i]
	}
	return ptrs
}